@isTest
private class WorkOrderModifiyControllerTest {
    static testMethod void testMethod1() {


    	//Id ldcProfile = [Select Id From Profile Where Name ='工程部工程师' ].Id;

    	 User u1 = [select Id from User where Profile.Name = '工程部工程师'  and isActive = true limit 1];


        Account acc=new Account();
        acc.Name='Test1229J';
        insert acc;
 

        Case cas=new Case();
        cas.AccountId=acc.Id;
        insert cas;

        WorkOrder__c wo=new WorkOrder__c();
        wo.Case__c=cas.Id;
        wo.Account__c=acc.Id;
        wo.Status__c='处理中';
        wo.ProductLine__c = '生化';
        //wo.ManufactureInfo__c=p1.Id;
        wo.recordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('ServiceOrder','WorkOrder__c');
        insert wo;

    	PageReference page2 = new PageReference('/apex/WorkOrderModifiy?id='+wo.Id);

        System.Test.setCurrentPage(page2);

        WorkOrderModifiyController wp = new WorkOrderModifiyController();
        wp.init();

        Map<String,String> saveMap =new Map<String,String>();
        saveMap.put('Reason_Desc__c', 'ssss');
        wp.saveJson = EncodingUtil.urlEncode(JSON.serialize(saveMap), 'UTF-8');
        wp.save();
        
       
        
    }
}